public class Poly01 {
    public static void main(String[] args) {
//        Bone bone=new Bone("大棒骨");
//        Dog2 dog2=new Dog2("小黄");
//        Cat2 cat2=new Cat2("小猫");
//        Fish fish=new Fish("草鱼");

        Animal2 animal2=new Dog2("小黄");
        Food food=new Bone("大棒骨");

        Master master=new Master("zhangsan");
        master.feed(animal2,food);
//        master.feed(cat2,fish);

        Animal2 animal3=new Pig2("小胖");
        Food food1=new Rice2("米饭");
        Master master1=new Master("bruceli");
        master1.feed(animal3,food1);

        Country2 country2=new China2("中国");
        House2 house2=new Villa2("别墅");
        Master2 master2=new Master2("张三");
        master2.Housing(country2,house2);
        System.out.println("----------------");
        Country2 country3=new Amarica2("美国");
        House2 house3=new MansionFlat("大平层");
        master2.Housing(country3,house3);

    }
}
